﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Cinemachine;
public class InitFreeLook : MonoBehaviour
{
    private CinemachineFreeLook freeLookCam;
    private Vector3 initialPos;
    private float YAxisValue = 0;
    private float XAxisValue = 0;
    void Awake()
    {
        freeLookCam = this.GetComponent<CinemachineFreeLook>();
        initialPos = transform.localPosition;
        YAxisValue = freeLookCam.m_YAxis.Value;
        XAxisValue = freeLookCam.m_XAxis.Value;
    }

    void OnEnable()
    {
        freeLookCam.transform.localPosition = initialPos;
        freeLookCam.m_YAxis.Value = YAxisValue;
        freeLookCam.m_XAxis.Value = XAxisValue;
    }
}
